| 1 | <script lang="ts"> |
| 2 | import type { PageData } from "./$types"; |
| 3 | import { goto } from "$app/navigation"; |
| 4 | import ProgressiveImage from "$lib/components/ProgressiveImage.svelte"; |
| 5 | let { data }: { data: PageData } = $props(); |
| 6 | |
| 7 | function handleKeydown(event) { |
| 8 | if (event.key === "Escape") { |
| 9 | history.back(); |
| 10 | } |
| 11 | } |
| 12 | </script> |
| 13 | |
| 14 | <svelte:head> |
| 15 | <title>{data.photo.title} | steve.photo</title> |
| 16 | <meta |
| 17 | name="description" |
| 18 | content="{data.photo.title} - Shot on {data.photo.make} {data.photo.camera}" |
| 19 | /> |
| 20 | <meta property="og:type" content="article" /> |
| 21 | <meta property="og:title" content="{data.photo.title} | steve.photo" /> |
| 22 | <meta property="og:url" content="https://steve.photo/photo/{data.photo.slug}" /> |
| 23 | <meta |
| 24 | property="og:description" |
| 25 | content="{data.photo.title} - Shot on {data.photo.make} {data.photo.camera}" |
| 26 | /> |
| 27 | <meta property="og:image" content={data.photo.image} /> |
| 28 | <meta name="twitter:card" content="summary_large_image" /> |
| 29 | <meta name="twitter:title" content="{data.photo.title} | steve.photo" /> |
| 30 | <meta |
| 31 | name="twitter:description" |
| 32 | content="{data.photo.title} - Shot on {data.photo.make} {data.photo.camera}" |
| 33 | /> |
| 34 | <meta name="twitter:image" content={data.photo.image} /> |
| 35 | <link rel="canonical" href="https://steve.photo/photo/{data.photo.slug}" /> |
| 36 | </svelte:head> |
| 37 | |
| 38 | <svelte:window on:keydown={handleKeydown} /> |
| 39 | |
| 40 | <div class="bg-[#121113] min-h-screen text-white flex flex-col gap-4 pb-4"> |
| 41 | <div class="fixed bg-[#121113] w-full py-4 sm:px-8 px-4"> |
| 42 | <a href="/" class="text-sm hover:underline">steve.photo</a> |
| 43 | </div> |
| 44 | |
| 45 | <div class="flex sm:flex-row flex-col gap-2 sm:px-8 px-4 pt-16"> |
| 46 | <div class="flex-6 min-w-0"> |
| 47 | <ProgressiveImage |
| 48 | class="max-w-full h-auto block" |
| 49 | src={data.photo.image} |
| 50 | thumb={data.photo.thumb} |
| 51 | blurData={data.photo.blurData} |
| 52 | alt={data.photo.title} |
| 53 | /> |
| 54 | </div> |
| 55 | <div class="flex flex-col p-4 flex-1 min-w-0 justify-between"> |
| 56 | <div class="flex flex-col gap-1 flex-1 min-w-0"> |
| 57 | <h2 class="text-lg">{data.photo.title.toUpperCase()}</h2> |
| 58 | <h3 class="text-sm">{data.photo.make} {data.photo.camera}</h3> |
| 59 | <div class="flex flex-col gap-2 text-neutral-400 font-thin text-xs mt-4"> |
| 60 | <p>{data.photo.focalLength}</p> |
| 61 | <p>{data.photo.aperture}</p> |
| 62 | <p>{data.photo.exposure}</p> |
| 63 | <p>ISO {data.photo.iso}</p> |
| 64 | <p>-</p> |
| 65 | <p class="text-neutral-700 text-xs">{new Date(data.photo.date).toLocaleDateString()}</p> |
| 66 | </div> |
| 67 | </div> |
| 68 | <a class="text-zinc-400 hover:text-white text-xs sm:pt-0 pt-24" href="/">Back to gallery</a> |
| 69 | </div> |
| 70 | </div> |
| 71 | </div> |